#!/usr/bin/perl
#pvrescan
require './diskman-lib.pl';
&ReadParse();
my $err_msg = 'abc';
my (@dinfo);
@dinfo = get_all_lsi_diskinfo();
foreach $d (@dinfo) {
	if ($d->{'fstate'} == "Foreign") {
	`/sbin/MegaCli -cfgforeign -clear -a0`;
	}

	if ($d->{'status'} =~ /FAILED/){
		`/sbin/MegaCli -PDMakeGood -PhysDrv[$d->{'es'}] -a0`;
	}
}

`/sbin/MegaCli -AdpSetProp AlarmSilence -a0`;
#goto ERROR_OUT;

&redirect("index.cgi");

ERROR_OUT:
&error_setup($text{'crt_err_title'});
&error($err_msg);
